import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import NoPermission from './views/401.vue'
import Home from './views/Home.vue'
import echarts from './views/charts/echarts.vue'
import Permission from "./views/permission/Permission";
import Role from "./views/permission/Role";
//=================系统配置====================
import Config from "./views/sysmanage/Config";
import TenantType from "./views/sysmanage/TenantType";
import Tenant from "./views/sysmanage/Tenant";

import TenantRegister from "./views/sysmanage/TenantRegister";
import CarType from "./views/car/CarType";
import Car from "./views/car/Car";
//=================系统配置====================


let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/tenantRegister',
        component: TenantRegister,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: '',
        iconCls: '',
        hidden: true,
        leaf: true, // 当前是一个叶子节点,下面没有子菜单
        children: [
            { path: '/401', component: NoPermission, name: '' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: 'Charts',
        iconCls: 'fa fa-bar-chart',
        leaf: true,
        children: [
            { path: '/echarts', component: echarts, name: '首页' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '礼物管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/carType', component: CarType, name: '车辆类型管理' },
            { path: '/car', component: Car, name: '车辆管理' }
            /*{ path: '/employee', component: Employee, name: '员工管理' },
            { path: '/shop', component: Shop, name: '店铺管理' }*/
        ]
    },
    {
        path: '/',
        component: Home,
        name: '认证授权',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/permission', component: Permission, name: '权限列表' },
            { path: '/role', component: Role, name: '角色管理' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/tenantType', component: TenantType, name: '租户类型' },
            { path: '/tenant', component: Tenant, name: '租户管理' },
            { path: '/meal', component: TenantType, name: '套餐管理' },
            { path: '/employee', component: TenantType, name: '员工管理' },
            { path: '/department', component: TenantType, name: '部门管理' },
            { path: '/config', component: TenantType, name: '系统配置' }
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;